// 导入http请求头
import request from '@/utils/request'

// 封装一个获取组织架构的接口
export function getDepListApi(){
    return request({
        url:"/company/department"
    })
}


// 封住删除部门接口
export function removeDeptListApi(id){
    return request({
        url:`/company/department/${id}`,
        method:'DELETE'
    })
}



// 封装新增部门接口封装
export function addDeptListApi(data){
    return request({
        url:"/company/department",
        method:'POST',
        data
    })
}


// 封装根据id查询部门信息接口
export function getDeptDetailApi(id){
    return request({
        url:`/company/department/${id}`
    })
}




// 封装根据id修改部门信息接口
export function updateDeptApi(data) {
    return request({
    url:`/company/department/${data.id}`,
    method:'PUT',
    data
    })
}
